package com.example.dell.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.view.View;
import android.view.ViewGroup;

import java.util.List;

public class FragmentChengAdapter extends FragmentPagerAdapter {

    private List<Fragment> mFragments;
    private String[] mFragmentTags;
    public FragmentChengAdapter(FragmentManager fm, List<Fragment> fragments, String[] fragmentTags) {
        super(fm);
        this.mFragments = fragments;
        this.mFragmentTags = fragmentTags;

    }

    @Override
    public int getCount() {
        return mFragments.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return mFragmentTags[position];
    }

    @Override
    public Fragment getItem(int position) {
        return mFragments.get(position);
    }

}
